import 'package:finance_app/src/entities/payment_method_entity.dart';

paymentMethodEntityFromJson(PaymentMethodEntity data, Map<String, dynamic> json) {
	if (json['name'] != null) {
		data.name = json['name'].toString();
	}
	if (json['value'] != null) {
		data.value = json['value'].toString();
	}
	if (json['icon'] != null) {
		data.icon = json['icon'].toString();
	}
	return data;
}

Map<String, dynamic> paymentMethodEntityToJson(PaymentMethodEntity entity) {
	final Map<String, dynamic> data = new Map<String, dynamic>();
	data['name'] = entity.name;
	data['value'] = entity.value;
	data['icon'] = entity.icon;
	return data;
}